class CreateUsers < ActiveRecord::Migration[5.1]
  def up
    create_table :users do |t|
      t.string :name, index: true
      t.string :email
      t. string :password_digest
      t.string :recent_login_ip
      t.datetime :recent_login_at
      t.integer :login_count

      t.timestamps
    end
    add_index :users, :email, unique: true
  end

  def down
    drop_table :users
  end
end
